/*
 * @Descripttion: 
 * @version: 
 * @Author: ChenXiang
 * @Date: 2021-05-12 22:46:36
 * @LastEditors: ChenXiang
 * @LastEditTime: 2021-08-22 14:20:07
 */
import React from "react";
import ReactDOM from "react-dom";
import { QueryClientProvider, QueryClient } from "react-query";
import { ReactQueryDevtools } from "react-query/devtools";
import { Provider } from "react-redux";
import store from "./redux/store";
// import FastClick from "react-fastclick-alt";
import VConsole from "vconsole";
import RouterSourceCodeDemo from "./module/sourceCode/pages/router/index";

import Routes from "./router";
import "@/common/css/index.scss";
console.log("process.env", process.env);

// ↓ 初始化全局实例，通过该全局实例可以传入默认配置，这里本文不做详述
const queryClient = new QueryClient();
// window.document.documentElement.setAttribute('data-theme', 'pink');
document.getElementsByTagName("body")[0].className = "green";

if (process.env.NODE_ENV === "development") {
  // new VConsole();
}
ReactDOM.render(
  <QueryClientProvider client={queryClient}>
    <Provider store={store}>
      <Routes />
    </Provider>
    {/* <ReactQueryDevtools initialIsOpen={false} /> */}
  </QueryClientProvider>,
  // <RouterSourceCodeDemo />
  document.getElementById("root")
);
